<?php
$start = '';
$error = isset($_GET['error']) ? $_GET['error'] : '';
/* user data */
$where_user = array(
		Tbluser::id => $_SESSION['acc_id']
);
$user_data = select(Tbluser::Tbluser, '', $where_user);
$result = mysql_fetch_array($user_data);
/* end user data */
$success = isset($_GET['success']) ? $_GET['success'] : '';
?>

<div class="box laster custom">
	<div class="box-heading">
		<h2>
			<?php echo $lang['UR_ACCOUNT']; ?>
		</h2>
	</div>
	<div class="box-content">
		<div class="product-grid" style="padding: 10px;">
			<div class="clear"></div>
			<table style="width: 100%" class="table">
				<tr>
					<td>
						<!--First Name--> <?php echo $lang['SHIP_FIR_NAME']; ?> <?php echo $start; ?>
					</td>
					<td>:</td>
					<td><?php echo $result[Tbluser::first_name]; ?></td>
				</tr>
				<tr>
					<td>
						<!--Last Name--> <?php echo $lang['SHIP_LAS_NAME']; ?> <?php echo $start; ?>
					</td>
					<td>:</td>
					<td><?php echo $result[Tbluser::last_name] ?></td>
				</tr>
				<tr>
					<td>
						<!--Email--> <?php echo $lang['SHIP_EMAIL']; ?> <?php echo $start; ?>
					</td>
					<td>:</td>
					<td><?php echo $result[Tbluser::email] ?></td>
				</tr>
				<tr>
					<td>
						<!--Telephone--> <?php echo $lang['SHIP_PHONE']; ?> <?php echo $start; ?>
					</td>
					<td>:</td>
					<td><?php echo $result[Tbluser::phone] ?></td>
				</tr>
				<tr>
					<td>
						<!--Mobile--> <?php echo $lang['SHIP_MPHONE']; ?>
					</td>
					<td>:</td>
					<td><?php echo $result[Tbluser::mobile] ?></td>
				</tr>
				<tr>
					<td>
						<!--Address, Street--> <?php echo $lang['ADDRESSSTREET']; ?> <?php echo $start; ?>
					</td>
					<td>:</td>
					<td><?php echo $result[Tbluser::address] ?></td>
				</tr>
				<tr>
					<td><?php
					$districts = '';
					$district = select(Tblstate::tblname, array(), array(Tblstate::id => $result[Tbluser::location]));
					while ($dis_data = mysql_fetch_assoc($district)) :
					$districts = $dis_data[Tblstate::name];
					endwhile;
					?> <!--Location--> <?php echo $lang['UR_DISTRICT']; ?> <?php echo $start; ?>
					</td>
					<td>:</td>
					<td><?php echo $districts; ?>
					</td>
				</tr>
				<tr>
					<td><?php
					$pro = '';
					$province = select(Tblprovince::tblprovince, array(), array(Tblprovince::id => $result[Tbluser::state_id]));
					while ($province_data = mysql_fetch_assoc($province)) :
					$pro = $province_data[Tblprovince::name];
					endwhile;
					?> <!--Location--> <?php echo $lang['SHIP_PRO_STATE']; ?> <?php echo $start; ?>
					</td>
					<td>:</td>
					<td><?php echo $pro; ?>
					</td>
				</tr>
				<tr>
					<td>
						<!--Country--> <?php echo $lang['SHIP_COUNTRY']; ?> <?php echo $start; ?>
					</td>
					<td>:</td>
					<td><select id="country" name="country" class="b" disabled="disabled">
							<?php
							$str = "SELECT id, country_name from tblcountries order by country_name";
							$query = mysql_query($str);
							$num_rows = mysql_num_rows($query);
							while ($data = mysql_fetch_array($query)) {
                                        ?>
							<option value="<?php echo $data['id']; ?>"
							<?php echo($data['id'] == $result[Tbluser::country_id]) ? ' selected="selected"' : '' ?>>
								<?php echo $data['country_name']; ?>
							</option>
							<?php
                                    }
                                    ?>
					</select>
					</td>
				</tr>
				<?php if ($usertype == 2): ?>				
				<tr height="60">
					<td colspan="3">
						<div style="margin-top: 30px;">
							<span style="color: #417EFB; font-size: 18px;"> <!--Company Infomation-->
								<?php echo $lang['COMPANYINFO']; ?>
							</span>
						</div>
					</td>
				</tr>

				<tr>
					<td>
						<!--Company Name--> <?php echo $lang['COMPANYNAMEE']; ?> <?php echo $start; ?>
					</td>
					<td>:</td>
					<td><?php echo @$result['pharmacy_name'] ?></td>
				</tr>
				<tr>
					<td>
						<!--Logo--> <?php echo $lang['LOGO']; ?>
					</td>
					<td>:</td>
					<td>
						<!-- log -->
					</td>
				</tr>
				<tr>
					<td></td>
					<td></td>
					<td><?php
					if (@$result['pharmacy_image'] != "") {
                                        ?> &nbsp;<img
						src="<?php echo base_url; ?>upload/<?php echo $result['pharmacy_image']; ?>"
						class="border" /> <?php
                                    } else {
                                        echo $lang['NOIMAGESS'];
                                    }
                                    ?>
					</td>
				</tr>				
				<tr>
					<td>
						<!--Website--> <?php echo $lang['WEBSITE']; ?>
					</td>
					<td>:</td>
					<td><?php echo @$result['website']; ?></td>
				</tr>				
				<?php endif; ?>
				<tr>
					<td></td>
					<td></td>
					<td><a class="btn pull-right"
						href="<?php echo base_url; ?>account/edit_profile.php"> <!--Edit your Profile-->
							<?php echo $lang['AD_EDIT_PROFILE']; ?>
					</a>
					</td>
				</tr>
				
			</table>

		</div>
	</div>
</div>
